package com.ddw.meedeeuh.shared.movie.scrapers;

import com.ddw.meedeeuh.shared.io.SourceFolder;
import com.ddw.meedeeuh.shared.movie.Movie;

public abstract class MovieScraperResultFactory {

	public static MovieScraperResult create(MovieScraperResultType result) {
		return new MovieScraperResultImpl(result, null, null);
	}

	public static MovieScraperResult create(MovieScraperResultType result, SourceFolder folder, Movie movie) {
		return new MovieScraperResultImpl(result, folder, movie);
	}

	private static class MovieScraperResultImpl implements MovieScraperResult {

		private final MovieScraperResultType result;
		private final SourceFolder folder;
		private final Movie movie;

		MovieScraperResultImpl(MovieScraperResultType result, SourceFolder folder, Movie movie) {
			this.result = result;
			this.folder = folder;
			this.movie = movie;
		}

		@Override
		public SourceFolder getFolder() {
			return this.folder;
		}

		@Override
		public Movie getMovie() {
			return this.movie;
		}

		@Override
		public MovieScraperResultType getResult() {
			return this.result;
		}

	}

}
